<legend><h3>SMS > Inbox</h3></legend>
<?php if (isset($masuk)) { ?>
    <table class="table table-bordered">
        <tr>
            <th align="center">Pengirim</th>
            <th align="center">Isi Pesan</th>
            <th align="center">Tanggal Diterima</th>
            <th align="center">Balas SMS</th>
        </tr>

        <?php foreach ($table as $m) {
            ?>
            <tr>
                <td width="15%"><?php echo $m->SenderNumber; ?></td>
                <td width="60%"><?php echo $m->TextDecoded; ?></td>
                <td width="21%"><?php echo $m->ReceivingDateTime; ?></td>
                <td width="4%"><center>
                <?php
                if (isset($telpon)) {
                    foreach ($telpon as $tlp) {
                        if ($m->SenderNumber == $tlp->telpon) {
                            ?>
                            <a href="<?php echo base_url() . 'sms/balas/' . $tlp->no;
                    ;
                            ?>"><img src="<? echo base_url() . "assets/img/reply_sms.png" ?>" height="32" width="32"></a></center></td>
                        <?
                    }
                }
            } else {
                NULL;
            }
            ?>
        </tr>
        <?php
    }
    ?>
    </table>
    <?
} else {
    "Data Kosong";
}
echo $links;
?>
<br/>